<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html>
<head>
<title>帐号管理</title>
<%@ include file="/common/meta.jsp"%>
</head>

<body>
<div id="content">
<div id="menu">
<h2>帐号列表 <a href="${ctx}/user/role.action">角色列表</a> 
    <a href="${ctx}/j_spring_security_logout">退出登录</a></h2>
</div>
<div id="list">
<table cellSpacing="0" cellPadding="1" border="1px">
	<tr>
		<th><b>登录名</b></th>
		<th><b>姓名</b></th>
		<th><b>电邮</b></th>
		<th><b>角色</b></th>
		<th><b>操作</b></th>
	</tr>

	<s:iterator value="page.list">
		<tr>
			<td>${loginName}&nbsp;</td>
			<td>${name}&nbsp;</td>
			<td>${email}&nbsp;</td>
			<td>${roleNames}&nbsp;</td>
			<td>&nbsp; 
				<security:authorize ifAllGranted="ROLE_MODIFY_USER">
					<a href="${ctx}/user/user!input.action?id=${id}">修改</a>、
					<a href="${ctx}/user/user!delete.action?id=${id}">删除</a>
				</security:authorize>
			</td>
		</tr>
	</s:iterator>
</table>
</div>
<div id="footer">
	共${page.totalPageCount}页 
	<s:if test="page.hasPrePage">
		<a href="${ctx}/user/user.action?page.pageNo=${page.prePage}">上一页</a>
	</s:if>
	<s:if test="page.hasNextPage">
		<a href="${ctx}/user/user.action?page.pageNo=${page.nextPage}">下一页</a>
	</s:if>
	<security:authorize ifAllGranted="ROLE_MODIFY_USER">
		<a href="${ctx}/user/user!input.action">增加新用户</a>
	</security:authorize>
</div>
</div>
</body>
</html>
